export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user/login',
        layout: false,
        name: 'login',
        component: './User/Login',
      },
      {
        path: '/user',
        redirect: '/user/login',
      },
      {
        name: 'register-result',
        icon: 'smile',
        layout: false,
        path: '/user/register-result',
        component: './User/RegisterResult',
      },
      {
        name: 'register',
        icon: 'smile',
        layout: false,
        path: '/user/register',
        component: './User/Register',
      },
      {
        name: 'forget-password',
        icon: 'smile',
        layout: false,
        path: '/user/forget-password',
        component: './User/ForgetPassword',
      },
      {
        name: 'forget-account',
        icon: 'smile',
        layout: false,
        path: '/user/forget-account',
        component: './User/ForgetAccount',
      },
      {
        component: '404',
      },
    ],
  },
  {
    path: '/welcome',
    name: 'welcome',
    icon: 'home',
    component: './Welcome',
  },
  {
    path: '/account/approve',
    // access: 'canRoot',
    access: 'canStudy',
    name: 'account.approve',
    icon: 'verified',
    hideInMenu: true,
    component: './Account/Approve',
  },
  {
    path: '/e/open',
    hideInMenu: true,
    redirect: '/account/open',
  },
  {
    path: '/account/open',
    // access: 'canRoot',
    // access: 'canStudy',
    name: 'account.open',
    // icon: 'verified',
    hideInMenu: true,
    component: './Account/Open',
  },
  // {
  //   path: '/dashboard',
  //   name: 'dashboard',
  //   icon: 'dashboard',
  //   routes: [
  //     {
  //       path: '/dashboard',
  //       redirect: '/dashboard/analysis',
  //     },
  //     {
  //       name: 'analysis',
  //       icon: 'smile',
  //       path: '/dashboard/analysis',
  //       component: './Dashboard/Analysis',
  //     },
  //     {
  //       component: './404',
  //     },
  //   ],
  // },
  // {
  //   path: '/admin',
  //   name: 'admin',
  //   icon: 'crown',
  //   access: 'canAdmin',
  //   // component: './Admin',
  //   routes: [
  //     {
  //       path: '/admin',
  //       redirect: '/admin/sub-page',
  //     },
  //     {
  //       path: '/admin/sub-page',
  //       name: 'sub-page',
  //       icon: 'smile',
  //       component: './Welcome',
  //     },
  //     {
  //       component: './404',
  //     },
  //   ],
  // },
  // {
  //   name: 'list.table-list',
  //   icon: 'table',
  //   path: '/list',
  //   component: './TableList',
  // },
  {
    name: 'ab',
    icon: 'safety',
    // access: 'hasSc',
    path: '/ab',
    routes: [
      {
        path: '/ab',
        // redirect: '/train/plan/list',
        redirect: '/ab/apply',
      },
      {
        name: 'apply',
        icon: 'form',
        path: '/ab/apply',
        component: './Ab/Apply',
      },
      {
        name: 'query',
        icon: 'search',
        path: '/ab/query',
        component: './Ab/Query',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'defense',
    icon: 'safety',
    access: 'hasSc',
    path: '/defense',
    routes: [
      {
        path: '/defense',
        redirect: '/defense/system/risk',
      },
      {
        name: 'system',
        icon: 'deployment-unit',
        path: '/defense/system',
        // component: './Defense/System',
        routes: [
          {
            path: '/defense/system',
            redirect: '/defense/system/risk',
          },
          // {
          //   name: 'recognize',
          //   icon: 'smile',
          //   path: '/defense/system/recognize',
          //   component: './Defense/System/Recognize',
          // },
          {
            name: 'risk',
            icon: 'smile',
            path: '/defense/system/risk',
            component: './Defense/System/Risk',
          },
          {
            name: 'trouble',
            icon: 'smile',
            path: '/defense/system/trouble',
            component: './Defense/System/Trouble',
          },
          {
            name: 'risk.check',
            icon: 'smile',
            path: '/defense/system/risk-check',
            component: './Defense/Database/Risk/check',
          },
          {
            name: 'trouble.check',
            icon: 'smile',
            path: '/defense/system/trouble-check',
            component: './Defense/Database/Trouble/check',
          },
          {
            name: 'assessment',
            icon: 'smile',
            path: '/defense/system/assessment',
            component: './Defense/System/Assessment',
          },
        ],
      },
      {
        name: 'database',
        icon: 'database',
        path: '/defense/database',
        // component: './Employee/Attach',
        routes: [
          {
            path: '/defense/database',
            redirect: '/defense/system/risk',
          },
          // {
          //   name: 'recognize',
          //   icon: 'smile',
          //   path: '/defense/database/recognize',
          //   component: './Defense/Database/Recognize',
          // },
          {
            name: 'risk',
            icon: 'smile',
            path: '/defense/database/risk',
            component: './Defense/Database/Risk',
          },
          {
            name: 'trouble',
            icon: 'smile',
            path: '/defense/database/trouble',
            component: './Defense/Database/Trouble',
          },
          {
            name: 'risk-map',
            icon: 'smile',
            path: '/defense/database/risk-map',
            component: './Defense/Database/RiskMap',
          },
          {
            name: 'risk-notice',
            icon: 'smile',
            path: '/defense/database/risk-notice',
            component: './Defense/Database/RiskNotice',
          },
          {
            name: 'manage-rule',
            icon: 'smile',
            path: '/defense/database/manage-rule',
            component: './Defense/Database/ManageRule',
          },
          {
            name: 'operating-instruction',
            icon: 'smile',
            path: '/defense/database/operating-instruction',
            component: './Defense/Database/OperatingInstruction',
          },
          {
            name: 'working-unit',
            icon: 'smile',
            path: '/defense/database/working-unit',
            component: './Defense/Database/WorkingUnit',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'train',
    icon: 'file-protect',
    access: 'hasTr',
    path: '/train',
    routes: [
      {
        path: '/train',
        // redirect: '/train/plan/list',
        redirect: '/train/plan',
      },
      {
        name: 'plan',
        icon: 'field-time',
        path: '/train/plan',
        component: './Train/Plan',
      },
      // {
      //   name: 'group',
      //   icon: 'group',
      //   path: '/train/group',
      //   component: './Train/Group',
      // },
      {
        name: 'task',
        icon: 'carry-out',
        path: '/train/task',
        component: './Train/Task',
      },
      {
        name: 'statistic',
        icon: 'fund-projection-screen',
        path: '/train/statistic',
        component: './Train/Statistic',
        // routes: [
        //   {
        //     path: '/train/statistic',
        //     redirect: '/train/statistic/list',
        //   },
        //   {
        //     name: 'list',
        //     icon: 'smile',
        //     path: '/train/statistic/list',
        //     component: './Train/Statistic',
        //   },
        //   {
        //     name: 'post',
        //     icon: 'smile',
        //     path: '/train/statistic/post',
        //     component: './Train/Statistic',
        //   },
        // ],
      },
      {
        name: 'courseware',
        icon: 'video-camera',
        path: '/train/courseware',
        component: './Train/Courseware',
      },
      {
        name: 'question',
        icon: 'exception',
        path: '/train/question',
        component: './Train/Question',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'employee',
    // access: 'hasBs',
    icon: 'team',
    path: '/employee',
    routes: [
      {
        path: '/employee',
        redirect: '/employee/list',
      },
      {
        name: 'list',
        icon: 'team',
        // menuRender: false,
        // menuHeaderRender: false,
        // headerRender: false,
        path: '/employee/list',
        component: './Employee/List',
      },
      {
        name: 'attach',
        icon: 'user-switch',
        path: '/employee/attach',
        component: './Employee/Attach',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'system',
    icon: 'setting',
    // access: 'hasBs',
    path: '/e',
    routes: [
      {
        path: '/e',
        redirect: '/e/settings',
      },
      {
        name: 'profile',
        icon: 'profile',
        path: '/e/settings',
        component: './Account/Settings',
      },
      {
        name: 'notice',
        icon: 'notification',
        path: '/e/notice',
        component: './Enterprise/Notice',
      },
      {
        name: 'document',
        icon: 'file-zip',
        path: '/e/document',
        component: './Enterprise/Document',
      },
      {
        name: 'certificate',
        icon: 'credit-card',
        path: '/e/certificates',
        component: './Enterprise/Certificates',
      },
      {
        name: 'org',
        icon: 'apartment',
        path: '/e/org',
        component: './Enterprise/Org',
      },
      {
        access: 'canRoot',
        name: 'account',
        icon: 'contacts',
        path: '/e/account',
        component: './Enterprise/Account',
      },
      {
        access: 'canRoot',
        name: 'post',
        icon: 'schedule',
        path: '/e/post',
        component: './Enterprise/Post',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: 'equipment',
    icon: 'car',
    access: 'hasSc',
    path: '/equipment',
    routes: [
      {
        path: '/equipment',
        redirect: '/equipment/vehicle',
      },
      {
        name: 'vehicle',
        icon: 'car',
        path: '/equipment/vehicle',
        component: './Enterprise/Vehicle',
      },
      {
        name: 'special',
        icon: 'control',
        path: '/equipment/special',
        component: './Enterprise/Equipment/special',
      },
      {
        name: 'other',
        icon: 'setting',
        path: '/equipment/other',
        component: './Enterprise/Equipment/other',
      },
      {
        component: './404',
      },
    ],
  },
  // {
  //   name: '个人设置',
  //   icon: 'smile',
  //   path: '/account/settings',
  //   component: './Account/Settings',
  // },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
